package com.jmp.api.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author cjr
 */
@Data
@Builder
public class IndexResponse {
    @ApiModelProperty(value = "1轮播图", dataType = "IndexResponse.Banner")
    private List<Banner> bannerList;
    @ApiModelProperty(value = "2精选品牌", dataType = "IndexResponse.Icon")
    private List<Icon> iconList;
    @ApiModelProperty(value = "5红木头条下轮播", dataType = "IndexResponse.Banner")
    private List<Banner> cardList;
    @ApiModelProperty(value = "6专题", dataType = "IndexResponse.Banner")
    private List<Banner> subjectList;

    @ApiModelProperty(value = "3置顶", dataType = "IndexResponse.Top")
    private Top articleTop;
    @ApiModelProperty(value = "4头条|轮播", dataType = "IndexResponse.Top")
    private List<Top> articleList;

    @ApiModelProperty(value = "5直播短视频", dataType = "IndexResponse.Live")
    private List<Live> liveList;

    @ApiModel("IndexResponse.Top")
    @Data
    @Builder
    public static class Top {
        @ApiModelProperty(value = "文章ID")
        private Integer articleId;
        private String title;
    }

    @Data
    @Builder
    @ApiModel("IndexResponse.Icon")
    public static class Icon {
        @ApiModelProperty("分类名称")
        private String name;
        @ApiModelProperty(value = "精选品牌", dataType = "IndexResponse.Banner")
        private List<Banner> children;
    }

    @Data
    @Builder
    @ApiModel("IndexResponse.Banner")
    public static class Banner {
        @ApiModelProperty("ID")
        private Integer bannerId;
        @ApiModelProperty("图片地址")
        private String source;
        @ApiModelProperty("点击事件：0 无 1 商品详情 2h5 3企业 4商品列表 5专题页 6奖券入口")
        private Integer event;
        @ApiModelProperty("点击事件参数")
        private String eventId;
        @ApiModelProperty("描述")
        private String memo;
        @ApiModelProperty("宽高比: 宽/高")
        private BigDecimal sizeRate;
    }


    @ApiModel("IndexResponse.Live")
    @Data
    @Builder
    public static class Live {
        @ApiModelProperty("直播ID")
        private Integer roomId;
        @ApiModelProperty("类型：0直播 1短视频")
        private Integer videoType;
        @ApiModelProperty("直播图片")
        private String photo;
        @ApiModelProperty("标题")
        private String title;
        @ApiModelProperty("状态图片:直播中 预告 回放")
        private String status;

        @ApiModelProperty("观看人数")
        private String viewNum;
        @ApiModelProperty("点赞数")
        private Integer collectNum;
        @ApiModelProperty("直播用户头像")
        private String userImg;
        @ApiModelProperty("直播用户名称")
        private String userName;

        @ApiModelProperty(value = "视频信息", dataType = "IndexResponse.Video")
        private Video video;
    }

    @ApiModel("IndexResponse.Video")
    @Data
    @Builder
    public static class Video {
        @ApiModelProperty("直播ID")
        private Integer roomId;
        @ApiModelProperty("直播名称")
        private String name;
        @ApiModelProperty("封面")
        private String photo;
        @ApiModelProperty("视频地址")
        private String videoUrl;

        @ApiModelProperty("是否已关注用户:0无 1已关注")
        private Integer userCollectFlag;
        @ApiModelProperty("用户当前直播ID")
        private Integer userCurrentRoomId;
        @ApiModelProperty("用户ID")
        private Integer userId;
        @ApiModelProperty("名片ID")
        private Integer cardId;
        @ApiModelProperty("名片头像")
        private String cardImg;
        @ApiModelProperty("名片名称")
        private String cardName;

        @ApiModelProperty("观看数")
        private Long viewNum;
        @ApiModelProperty("点赞数")
        private Integer collectNum;
        @ApiModelProperty("是否已点赞：1已点赞")
        private Integer collectFlag;
        @ApiModelProperty("评论数")
        private Integer commentNum;
    }
}
